Button
Type
widget
Summary
This widget is a highly customizable button, maintains its appearance regardless of platform or OS.
Description
This widget is a highly customizable button, maintains its appearance regardless of platform or OS.
Compatibility and Support
OS
mac
windows
linux
ios
android
web
Platforms
desktop
mobile
Associated Syntax
Property
| Name | Summary | Syntax |
|---|---|---|
| btnIconPath | The path data displayed by the widget as icon when the button is in its normal state. | set the btnIconPath of widget to <SVGPath> get the btnIconPath of widget |
| pbHoverColor | The color with which the background of the button is drawn when the pointer is over it. | set the pbHoverColor of widget to <RGB color> get the pbHoverColor of widget |
| hiliteIconFillRule | The fill rule applied to render the hilited icon. | set the hiliteIconFillRule of widget to {non-zero | even odd} get the hiliteIconFillRule of widget |
| showLabel | Specifies if the label of the widget is visible. | set the showLabel of widget to {true | false} get the showLabel of widget |
| highlight | Set the highlighted state of the widget. | set the highlight of widget to {true | false} get the highlight of widget |
| shadowColor | The color with which the drop shadow is drawn. | set the shadowColor of widget to <RGBA color> get the shadowColor of widget |
| btnIcon | The name of an SVG icon, which is displayed as an icon when the button is in its normal state. | set the btnIcon of widget to <IconName> get the btnIcon of widget |
| variant | Apply a predefined style to the widget. | set the variant of widget to {"text"|"contained"|"raised"|"outlined"|"icon"} get the variant of widget |
| cursorToHand | Specifies whether to change the mouse cursor to 'hand'. | set the cursorToHand of widget to {true | false} |
| highlightedLabelColor | The color with which the label is drawn, when the button is highlighted. | set the highlightedLabelColor of widget to <RGB color> get the highlightedLabelColor of widget |
| borderHiliteColor | The color of the border line when the button is hilited. | set the borderHiliteColor of widget to <RGB color> get the borderHiliteColor of widget |
| autoarm | Specifies whether a widget becomes armed when the mouse pointer moves into it. | set the autoArm of widget to {true | false} |
| rippleEffect | Shows the ripple Effect when pressed or not. | set the rippleEffect of widget to {true | false} get the rippleEffect of widget |
| pbNormalColor | Controls the background color of the button | get the pbNormalColor of <widget> set the pbNormalColor of <widget> to <pColor> |
| showShadow | Whether the widget has a shadow or not. | set the showShadow of widget to {true | false} get the showShadow of widget |
| rippEffect | Shows the ripple Effect when pressed or not. | set the rippEffect of widget to {true | false} get the rippEffect of widget |
| borderWidth | The border width of the widget. | set the borderWidth of widget to <integer> get the borderWidth of widget |
| btnHighlightedIconPath | The path data displayed by the widget as icon when the button is in its highlighted state. | set the btnHighlightedIconPath of widget to <SVGPath> get the btnHighlightedIconPath of widget |
| labelHiliteColor | The color with which the label is drawn, when the button is hilited. | set the labelHiliteColor of widget to <RGB color> get the labelHiliteColor of widget |
| iconFillRule | The fill rule applied to render the icon. | set the iconFillRule of widget to {non-zero | even odd} get the iconFillRule of widget |
| showName | Specifies if the label of the widget is visible. | set the showName of widget to {true | false} get the showName of widget |
| icon | The name of an SVG icon, which is displayed as an icon when the button is in its normal state. | set the icon of widget to <IconName> get the icon of widget |
| highlightedIconFillRule | The fill rule applied to render the highlighted icon. | set the highlightedIconFillRule of widget to {non-zero | even odd} get the highlightedIconFillRule of widget |
| autoHilite | Specifies whether a PowerButton widget highlights when it's pressed. | set the autoHilite of widget to {true | false} |
| showIconDivider | Specifies whether the widget (Button) icon divider is visible. | set the showIconDivider of widget to {true | false} get the showIconDivider of widget |
| iconRotation | Rotate the icon. | set the iconRotation of widget to {true | false} get the iconRotation of widget |
| hiliteTransparentBackground | Specifies whether the background of a button is transparent when its state is hilited. | set the hiliteTransparentBackground of widget to {true | false} get the hiliteTransparentBackground of widget |
| rippleColor | Controls the color of the ripple effect. | get the rippleColor of <widget> set the rippleColor of <widget> to <RGBA Color> |
| borderHoverColor | The color of the border line. | set the borderHoverColor of widget to <RGB color> get the borderHoverColor of widget |
| labelColor | The color with which the label is drawn. | set the labelColor of widget to <RGB color> get the labelColor of widget |
| opaque | Make the widget background solid. | set the opaque of widget to {true | false} get the opaque of widget |
| iconSize | Set the iconSize. | set the iconSize of widget to <Integer> get the iconSize of widget |
| autoHover | Specifies whether a widget becomes armed when the mouse pointer moves into it. | set the autoHover of widget to {true | false} |
| labelVOffset | Vertical offset of the label. | set the labelVOffset of widget to <integer> get the labelVOffset of widget |
| highlightedIconColor | The color with which the icon is drawn, when the button is highlighted. | set the highlightedIconColor of widget to <RGB color> get the highlightedIconColor of widget |
| label | The label displayed by the button. | set the label of widget to pLabel get the label of widget |
| textAlignment | Specifies the alignment that the text displayed in the label has with respect to the sides of the button. | set the textAlignment of widget to {center | left | right | top | bottom} get the textAlignment of widget |
| highlightedIconRotation | Rotate the icon when button is highlighted. | set the highlightedIconRotation of widget to {true | false} get the highlightedIconRotation of widget |
| hiliteIconColor | The color with which the icon is drawn, when the button is hilited. | set the hiliteIconColor of widget to <RGB color> get the hiliteIconColor of widget |
| labelHOffset | Horizontal offset of the label. | set the labelHOffset of widget to <integer> get the labelHOffset of widget |
| iconHOffset | Horizontal offset of the icon. | set the iconHOffset of widget to <integer> get the iconHOffset of widget |
| iconVOffset | Vertical offset of the icon. | set the iconVOffset of widget to <integer> get the iconVOffset of widget |
| iconPosition | Specifies the alignment that the icon has with respect to the sides of the button. | set the iconPosition of widget to {left | right | top | bottom} get the iconPosition of widget |
| normalColor | Controls the background color of the button | get the normalColor of <widget> set the normalColor of <widget> to <pColor> |
| fillGradient | Specifies the gradient to use to fill the Button object in its normal state (Experimental) | set the fillGradient of widget to <Array> get the fillGradient of widget |
| lineSize | The line size of the widget. | set the lineSize of widget to <integer> get the lineSize of widget |
| isToggle | Specifies whether a button stays hilited after being pressed. | set the isToggle of widget to {true | false} get the isToggle of widget |
| hiliteFillGradient | Specifies the gradient to use to fill the PowerButton object when it is hilited(Experimental) | set the hiliteFillGradient of widget to <Array> get the hiliteFillGradient of widget |
| hiliteColor | Controls the color of the button. | get the hiliteColor of <widget> set the hiliteColor of <widget> to <pColor> |
| hiliteIcon | The name of an SVG icon, which is displayed as an icon when the button is in its hilited state. | set the hiliteIcon of widget to <IconName> get the hiliteIcon of widget |
| iconHoverColor | The color with which the icon is drawn when the pointer is over the button. | set the iconHoverColor of widget to <RGB color> get the iconHoverColor of widget |
| roundHeight | The radius of the widget background edges. | set the roundHeight of widget to <integer> get the roundHeight of widget |
| transparentBackground | Specifies whether the background of a button is transparent when its state is normal. | set the transparentBackground of widget to {true | false} get the transparentBackground of widget |
| highlightedBorderColor | The color of the border line when the button is highlighted. | set the highlightedBorderColor of widget to <RGB color> get the highlightedBorderColor of widget |
| hoverWhenHilited | Allows the mouse hover effect to be generated when the button has the toggle property active. | set the hoverWhenHilited of widget to {true | false} get the hoverWhenHilited of widget |
| highlightedTransparentBackground | Specifies whether the background of a button is transparent when its state is highlighted. | set the highlightedTransparentBackground of widget to {true | false} get the highlightedTransparentBackground of widget |
| pbHiliteColor | Controls the color of the button. | get the pbHiliteColor of <widget> set the pbHiliteColor of <widget> to <pColor> |
| margin | Specifies how much empty space is left on each side between the borders of the widget and its icon and label. | set the margin of widget to <integer> get the margin of widget |
| highlightedLabel | Specifies the string to display in the text label that is drawn on the widget when its state is Highlighted. | set the highlightedLabel of widget to <labelString> get the highlightedLabel of widget |
| showIcon | Specifies whether the widget (Button) icon is visible. | set the showIcon of widget to {true | false} get the showIcon of widget |
| iconColor | The color with the icon is drawn when the button is in its normal state. | set the iconColor of widget to <RGB color> get the iconColor of widget |
| centerElements | Specifies whether the icon and label of the widget (Button) are pushed to the center. | set the centerElements of widget to {true | false} get the centerElements of widget |
| hiliteIconPath | The path data displayed by the widget as icon when the button is in its hilited state. | set the hiliteIconPath of widget to <SVGPath> get the hiliteIconPath of widget |
| centerRippleEffect | Sets the ripple effect origin to the widget's center. | set the centerRippleEffect of widget to {true | false} get the centerRippleEffect of widget |
| autohilight | Specifies whether a PowerButton widget highlights when it's pressed. | set the autoHilight of widget to {true | false} |
| RRadius | ||
| wrapText | Wrap text to match available width. | set the wrapText of widget to {true | false} get the wrapText of widget |
| hiliteIconRotation | Rotate the icon when button is hilited. | set the hiliteIconRotation of widget to {true | false} get the hiliteIconRotation of widget |
| hilite | Set the hilite state of the widget. | set the hilite of widget to {true | false} get the hilite of widget |
| isHilited | Set the highlighted state of the widget. | set the isHilited of widget to {true | false} get the isHilited of widget |
| iconPath | The path data displayed by the widget as icon when the button is in its normal state. | set the iconPath of widget to <SVGPath> get the iconPath of widget |
| hiliteLabel | Specifies the string to display in the text label that is drawn on the widget when its state is hilited. | set the hiliteLabel of widget to <labelString> get the hiliteLabel of widget |
| roundRadius | The radius of the widget background edges. | set the roundRadius of widget to <integer> get the roundRadius of widget |
| hoverFillGradient | Specifies the gradient to use to fill the PowerButton object when the mouse is hovering (Experimental) | set the hoverFillGradient of widget to <Array> get the hoverFillGradient of widget |
| hiliteBtnColor | Controls the color of the button. | get the hiliteBtnColor of <widget> set the hiliteBtnColor of <widget> to <pColor> |
| labelToUpper | Transform the label to upper case. | set the labelToUpper of widget to {true | false} get the labelToUpper of widget |
| roundedRadius | ||
| hoverIconColor | The color with which the icon is drawn when the pointer is over the button. | set the hoverIconColor of widget to <RGB color> get the hoverIconColor of widget |
| hoverLabelColor | The color with which the label is drawn when the pointer is over the button. | set the hoverLabelColor of widget to <RGB color> get the hoverLabelColor of widget |
| btnHighlitedIcon | The name of an SVG icon, which is displayed as an icon when the button is in its highlighted state. | set the btnHighlitedIcon of widget to <IconName> get the btnHighlitedIcon of widget |
| hoverBorderColor | The color of the border line. | set the hoverBorderColor of widget to <RGB color> get the hoverBorderColor of widget |
| textAlign | Specifies the alignment that the text displayed in the label has with respect to the sides of the button. | set the textAlign of widget to { left | center | right } get the textAlign of widget |
| hoverColor | The color with which the background of the button is drawn when the pointer is over it. | set the hoverColor of widget to <RGB color> get the hoverColor of widget |
| labelHoverColor | The color with which the label is drawn when the pointer is over the button. | set the hoverLabelColor of widget to <RGB color> get the hoverLabelColor of widget |
| hoverTransparentBackground | Specifies whether the background of a button is transparent when the mouse pointer enters the button. | set the hoverTransparentBackground of widget to {true | false} get the hoverTransparentBackground of widget |
| pbShadowColor | The color with which the drop shadow is drawn. | set the pbShadowColor of widget to <RGBA color> get the pbShadowColor of widget |
Message
| Name | Summary | Syntax |
|---|---|---|
| mouseUp | Sent when the user releases the mouse button. | mouseUp |
| mouseDown | Sent when the user presses the mouse button. | mouseDown |
| mouseRelease | Sent when the user releases the mouse outside the control that was clicked. | mouseRelease |
| mouseEnter | mouseEnter. | mouseEnter |
| mouseLeave | mouseLeave. | mouseLeave |
| resizeControl | resizeControl. | resizeControl |
| longTouch | Sent when the touch persists. | longTouch pButton |
| rippleEnd | Sent when the ripple effect ends. | rippleEnd pButton |